import 'package:flutter/material.dart';

void main() =>runApp(MyApp(
//    items:new List<String>.generate(10, (i)=>"item+$i")


));

class MyApp extends StatelessWidget {

  final List<String> items;

  MyApp({Key key, @required this.items}) :super(key: key);


  @override
  Widget build(BuildContext context) {
    var stack=new Stack(
      alignment: FractionalOffset(0.5, 0.9),
      children: <Widget>[
        new CircleAvatar(
          backgroundImage:  new NetworkImage("https://gaitaobao4.alicdn.com/tfscom/i2/1120939063/O1CN012gx6c02Gou1JK565R_!!0-item_pic.jpg_300x300.jpg"),
          radius: 100.0,
        ),
        new Container(
          decoration: new BoxDecoration(
            color: Colors.lightBlue,
          ),
          padding: EdgeInsets.all(5.0),
          child: new Text("你好"),
        ),
      ],
    );
    return MaterialApp(
        title: "Row Widgth demo",
        home: Scaffold(
            appBar: AppBar(
              title: Text("Row Widgth demo  水平布局"),
            ),
            body:Center(
              child: stack,
            )
        )
    );
  }
}

class My4 extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Row(
      children: <Widget>[
        RaisedButton(
          onPressed: (){

          },
          color: Colors.pinkAccent,
          child: Text("read")
          ,
        ),
        Expanded(child: RaisedButton(
          onPressed: (){
            print("wo kanakjn ");

          } ,
          color: Colors.lightBlue,
          child: Text("read1")
          ,
        )),
        Expanded(child: RaisedButton(
          onPressed: (){
            print("wo kanakjn ");

          } ,
          color: Colors.blueAccent,
          child: Text("read1")
          ,
        )),
        Expanded(child: RaisedButton(
          onPressed: (){
            print("wo kanakjn ");

          } ,
          color: Colors.pinkAccent,
          child: Text("read1")
          ,
        )),
        Expanded(child: RaisedButton(
          onPressed: (){
            print("wo kanakjn ");

          } ,
          color: Colors.pinkAccent,
          child: Text("read1")
          ,
        )),

      ],


    );
  }
}


class My3 extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Row(
      children: <Widget>[

        RaisedButton(
          onPressed: (){
            print("wo kanakjn ");

          } ,
          color: Colors.pinkAccent,
          child: Text("read1")
          ,
        ),
        Expanded(child: RaisedButton(
          onPressed: (){
            print("wo kanakjn ");

          } ,
          color: Colors.pinkAccent,
          child: Text("read1")
          ,
        )),
        Expanded(child: RaisedButton(
          onPressed: (){
            print("wo kanakjn ");

          } ,
          color: Colors.pinkAccent,
          child: Text("read1")
          ,
        )),
        RaisedButton(
          onPressed: (){
            print("wo kanakjn ");

          } ,
          color: Colors.pinkAccent,
          child: Text("read1")
          ,
        ),

      ],


    );
  }
}